const http = require('http')
const server = http.createServer((request, response) => {
    // 设置响应状态码
    response.statusCode = 200
    // response.statusCode = 404
    // 设置响应状态的描述
    response.statusMessage = 'ok'
    // 设置响应头
    response.setHeader('Content-Type', 'text/html;charset=utf-8')
    // 设置响应体
    response.write('666')
    response.write('666')
    response.write('666')
    // 设置响应体
    response.end()
})
server.listen(9000, () => {
    console.log('服务已启动...');
})